package semantic.rules.walk

import scala.collection.mutable.Buffer
import utils.data.CTree
import semantic.COperations._
import lexis.CLexemeType._
import syntax.{CTerminal, CGrammar, CASTNode}
import CGrammar.LexemeType2Terminal

object CWalkRuleNumber extends CWalkRule
{
    override val categories:Seq[CTerminal] = NUMBER :: Nil

    override def post(node:CASTNode)(implicit tree:CTree[CASTNode], code:Buffer[String]) = code += s"$PUSH ${node.value}n"
}

